import br.edu.ufcg.unknown.lexico.AnalisadorLexicoTest;
import br.edu.ufcg.unknown.lexico.FluxoDeCaractereTest;
import br.edu.ufcg.unknown.lexico.TokenTest;
import br.edu.ufcg.unknown.sintatico.AnalisadorSintaticoTest;
import br.edu.ufcg.unknown.sintatico.IdentificaTKTest;
import br.edu.ufcg.unknown.sintatico.TabelaDeSimbolosTest;
import junit.framework.Test;
import junit.framework.TestSuite;

public class TestesDeUnidade {

	public static Test suite() {

		TestSuite suite = new TestSuite("Unknown Compiler");

		suite.addTestSuite(AnalisadorLexicoTest.class);
		suite.addTestSuite(FluxoDeCaractereTest.class);
		suite.addTestSuite(TabelaDeSimbolosTest.class);
		suite.addTestSuite(AnalisadorSintaticoTest.class);
		suite.addTestSuite(TokenTest.class);
		suite.addTestSuite(IdentificaTKTest.class);

		return suite;
	}

	public static void main(String[] args) {
		if (args.length == 0) {
			junit.textui.TestRunner.run(TestesDeUnidade.suite());
		} else if (args[0].equals("swingui")) {
			junit.swingui.TestRunner.run(TestesDeUnidade.class);
		} else if (args[0].equals("textui")) {
			junit.textui.TestRunner.run(TestesDeUnidade.suite());
		}

	}

}
